import hashlib

def sha256_hash(text):
    sha256 = hashlib.sha256() # 创建shas256对象
    sha256.update(text.encode('utf-8')) # 输入的字服串需要先编码为bytes
    return sha256.hexdigest() # 获取16进制的哈希值